package abstracts;

import graphical.Facoty;

import java.util.Scanner;

/**
 * @Author admin
 * @Date 2019/3/20 10:40
 */
public class Test {
    public static void main(String[] args) {
        /*利用多态的方式创建对象*/
        /*Shape shape = new Circle(2);
        shape.output();*/
        Scanner in = new Scanner(System.in);
        System.out.println("请选择要计算面积的图形");
        System.out.println("1-----圆形\n2-----三角形");
        int choose = in.nextInt();
        Shape shape = Factorys.getshape(choose);
        shape.output();
    }
}
